package vip.sujianfeng.enjoyapi.po.demo

import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import vip.sujianfeng.enjoydao.annotations.*
import vip.sujianfeng.enjoydao.sqlcondition.*
import vip.sujianfeng.enjoydao.enums.*

/**
 * author GenerateModelBuilder
 * description 读取数据库生成的实体模型代码，不要手动修改，重新生成后会覆盖
 **/
@ApiModel("上课记录PO")
@TbTableUuid(table = "demo_class_record")
open class DemoClassRecordPO: vip.sujianfeng.enjoyapi.dbconn.MyModelBase() {
    @ApiModelProperty("出勤情况：0-未出勤，1-出勤")
    @TbFieldInt(tableField = "attendance", label = "出勤情况：0-未出勤，1-出勤")
    var attendance: Int? = null
    @ApiModelProperty("教室")
    @TbFieldString(tableField = "classroom", label = "教室", length = 50)
    var classroom: String? = null
    @ApiModelProperty("课程ID")
    @TbFieldString(tableField = "course_id", label = "课程ID", length = 50)
    var courseId: String? = null
    @ApiModelProperty("结束时间")
    @TbFieldLong(tableField = "end_time", label = "结束时间")
    var endTime: Long? = null
    @ApiModelProperty("开始时间")
    @TbFieldLong(tableField = "start_time", label = "开始时间")
    var startTime: Long? = null
    @ApiModelProperty("学生ID")
    @TbFieldString(tableField = "student_id", label = "学生ID", length = 50)
    var studentId: String? = null
    @ApiModelProperty("教师ID")
    @TbFieldString(tableField = "teacher_id", label = "教师ID", length = 50)
    var teacherId: String? = null

    companion object {
        const val TABLE_NAME = "demo_class_record"
        const val ATTENDANCE = "attendance"
        const val BIZ_STATUS = "biz_status"
        const val CLASSROOM = "classroom"
        const val COURSE_ID = "course_id"
        const val CREATE_TIME = "create_time"
        const val CREATE_USER_ID = "create_user_id"
        const val END_TIME = "end_time"
        const val ID = "id"
        const val REMARK = "remark"
        const val START_TIME = "start_time"
        const val STATE = "state"
        const val STUDENT_ID = "student_id"
        const val TEACHER_ID = "teacher_id"
        const val UPDATE_TIME = "update_time"
        const val UPDATE_USER_ID = "update_user_id"
    }
}

/**
 * author GenerateModelBuilder
 * description Sql条件生成器
 **/
class DemoClassRecordCU: SqlConditionBuilder<DemoClassRecordCU>() {
    var ATTENDANCE = SqlConditionField<DemoClassRecordCU>(this, "a.attendance")
    var BIZ_STATUS = SqlConditionField<DemoClassRecordCU>(this, "a.biz_status")
    var CLASSROOM = SqlConditionField<DemoClassRecordCU>(this, "a.classroom")
    var COURSE_ID = SqlConditionField<DemoClassRecordCU>(this, "a.course_id")
    var CREATE_TIME = SqlConditionField<DemoClassRecordCU>(this, "a.create_time")
    var CREATE_USER_ID = SqlConditionField<DemoClassRecordCU>(this, "a.create_user_id")
    var END_TIME = SqlConditionField<DemoClassRecordCU>(this, "a.end_time")
    var ID = SqlConditionField<DemoClassRecordCU>(this, "a.id")
    var REMARK = SqlConditionField<DemoClassRecordCU>(this, "a.remark")
    var START_TIME = SqlConditionField<DemoClassRecordCU>(this, "a.start_time")
    var STATE = SqlConditionField<DemoClassRecordCU>(this, "a.state")
    var STUDENT_ID = SqlConditionField<DemoClassRecordCU>(this, "a.student_id")
    var TEACHER_ID = SqlConditionField<DemoClassRecordCU>(this, "a.teacher_id")
    var UPDATE_TIME = SqlConditionField<DemoClassRecordCU>(this, "a.update_time")
    var UPDATE_USER_ID = SqlConditionField<DemoClassRecordCU>(this, "a.update_user_id")
}
